<!-- BEGIN PAGE HEADER-->
<?php $this->load->view('partials/breadcrumb.tpl', Array('_BTN_GROUP'=>array('url'=>site_url($thisModule.$thisController),  'class'=>'btn default', 'name'=>'返回列表', 'i'=>'<i class="m-icon-swapleft"></i>')))?>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
	<div class="col-xs-12 ">
		<!-- BEGIN SAMPLE FORM PORTLET-->
		<div class="portlet">
			<div class="tabbable">
				<div class="tab-content">
					<div class="tab-pane active" id="tab_1">
						<!-- 提款信息和顾客信息开始 -->
						<div class="row">
							<div class="col-md-6 col-sm-12">
								<div class="portlet box green">
									<div class="portlet-title">
										<div class="caption">
											<i class="fa fa-cogs"></i>红利信息
										</div>
									</div>
									<div class="portlet-body" style="line-height:25px;">
										<div class="row static-info">
											<div class="col-xs-3 name">红利单号:</div>
											<div class="col-xs-9 value">
												<span><?=htmlspecialchars($withdraw->no)?></span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">申请时间:</div>
											<div class="col-xs-9 value">
												<span><?=date('Y-m-d H:i:s', $withdraw->create_time)?> </span>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">数量:</div>
											<div class="col-xs-9 value"><?='￥'.$withdraw->amount?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">平台转移状态:</div>
											<div class="col-xs-9 value"><span style="cursor:text" class="<?=element($withdraw->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Withdraw::getTransferState($withdraw->transfer_status)?></span></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">红利审核状态:</div>
											<div class="col-xs-9 value"><span style="cursor:text" class="<?=element($withdraw->withdraw_status, $this->pay_status_css, '')?>"><?=IOSS_Withdraw::getWithdrawState($withdraw->withdraw_status)?></span>
											<?php if($p->edit):?>
											<?php if($withdraw->transfer_status == IOSS_Withdraw::TRANSFER_STATE_SUCCESS && $withdraw->withdraw_status == IOSS_Withdraw::WITHDRAW_STATE_NOT_PAID){?>
												&nbsp; 
												<a class="btn btn-xs btn-link" style="" href="javascript:ioss_url_modal('<?=site_url($thisModule.$thisController.'/withdrawPopup/'.$withdraw->id.'/'.$withdraw->update_time)?>');">
													<i class="fa fa-check"></i>&nbsp;点击确认&nbsp;
												</a>
												&nbsp; 
												<a class="btn btn-xs btn-link" style="color:red;" href="javascript:ioss_url_modal('<?=site_url($thisModule.$thisController.'/withdrawRefusePopup/'.$withdraw->id.'/'.$withdraw->update_time)?>');">
													<i class="fa fa-check icon-info" ></i>&nbsp;驳回申请&nbsp;
												</a>
											<?php }?>
											<?php endif;?>
											</div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">通道流水号:</div>
											<div class="col-xs-9 value"><?=$withdraw->withdraw_transaction?></div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-6 col-sm-12">
								<div class="portlet green box">
									<div class="portlet-title">
										<div class="caption"><i class="fa fa-cogs"></i> 用户通道信息</div>
									</div>
									<div class="portlet-body" style="line-height:25px;">
										<div class="row static-info">
											<div class="col-xs-3 name">通道名称:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userBankInfo->bank)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">子名称:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userBankInfo->branch)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">省份:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userBankInfo->provice)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">城市:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userBankInfo->city)?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">帐户:</div>
											<div class="col-xs-9 value" ><?=$userBankInfo->card_no?></div>
										</div>
										<div class="row static-info">
											<div class="col-xs-3 name">姓名:</div>
											<div class="col-xs-9 value" ><?=htmlspecialchars($userBankInfo->card_name)?></div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 提款信息和顾客信息结束 -->
						<!-- 用户游戏记录开始 -->
						<div class="portlet-body">
            				<div class="row">
            					<div class="col-md-12">
            						<div class="portlet-title">
    									<div class="caption">
    										<i class=""></i><span style="color:purple;font-size:16px;">该用户曾经所有操作记录</span>
    									</div>
    								</div>
            						<div class="table-scrollable">
            							<table class="table table-hover table-bordered table-striped">
            								<thead>
            								<tr>
            									<th width="10%">记录编号</th>				
            									<th width="10%">记录单号</th>
            									<th width="10%">记录数量</th>
            									<th width="10%">记录时间</th>
            								</tr>
            								</thead>
            								<tbody>
            								<?php if(count($list)):?>
            								<?php  foreach ($list as $node){	?>
            									<tr>
            										<td><?=htmlspecialchars($node->id)?></td>
            										<td><?=htmlspecialchars($node->bill_no)?></td>
            										<td><?=htmlspecialchars($node->net_amount)?></td>
            										<td><?=date('Y-m-d H:i:s',$node->bet_time)?></td>
            									</tr>
            								<?php }?>
            								<?php else:?>
            									<tr>
            										<td colspan="4" align="center" style="color:red;">该用户操作记录为空</td>
            									</tr>
            								<?php endif;?>
            								</tbody>
            							</table>
            						</div>
            					</div>
            				</div>
            				<div class="row">
            					<div class="col-md-12 text-right">
            						<?=$pagination?>
            					</div>
            				</div>
            			</div>
						<!-- 用户游戏记录结束 -->
						<!-- 该用户曾经充值记录开始 -->
						<div>
						<div class="row">
							<div class="col-md-12 col-sm-12">
								<div class="portlet-title">
									<div class="caption">
										<i class=""></i><span style="color:green;font-size:16px;">该用户曾经所有订单记录</span>
									</div>
								</div>
								<div class="table-scrollable">
        							<table class="table table-hover table-bordered table-striped">
        								<thead>
        								<tr>
        									<th width="15%">订单号</th>				
        									<th width="10%">数量</th>
        									<th width="15%">通道</th>
        									<th width="15%">创建时间</th>
        									<th width="10%">通道状态</th>
        									<th width="10%">平台状态</th>
        								</tr>
        								</thead>
        								<tbody>
        								<?php if(count($orders)):?>
        								<?php  foreach ($orders as $node){	?>
        									<tr>
        										<td>
        										<span><?=htmlspecialchars($node->no)?></span>
        										</td>
        										<td><?=htmlspecialchars($node->amount)?></td>
        										<td><?=htmlspecialchars($node->pay_channel)?></td>
        										<td><?=date('Y-m-d H:i:s',$node->create_time)?></td>
        										<td><span style="cursor:text" class="<?=element($node->pay_status, $this->pay_status_css, '')?>"><?=IOSS_Order::getPayState($node->pay_status)?></span></td>
        										<td><span style="cursor:text" class="<?=element($node->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Order::getRechargeState($node->transfer_status)?></span></td>
        									</tr>
        								<?php }?>
        								<?php else:?>
        									<tr>
        										<td colspan="6" align="center" style="color:red;">该用户订单记录为空</td>
        									</tr>
        								<?php endif;?>
        								</tbody>
        							</table>
        						</div>
							</div>
						</div>
						<!-- 该用户曾经充值记录结束 -->
						
						<!-- 该用户曾经提款记录开始 -->
						<div class="row">
							<div class="col-md-12 col-sm-12">
								<div class="portlet-title">
									<div class="caption">
										<i class=""></i><span style="color:red;font-size:16px;">该用户曾经所有红利记录</span>
									</div>
								</div>
								<div class="table-scrollable">
        							<table class="table table-hover table-bordered table-striped">
        								<thead>
            								<tr>
            									<th width="10%">红利单号</th>				
            									<th width="10%">数量</th>
            									<th width="15%">申请时间</th>
            									<th width="10%">流水号</th>
            									<th width="10%">平台状态</th>
            									<th width="10%">红利审核状态</th>
            								</tr>
            								</thead>
            								<tbody>
            								<?php if(count($withdraws)):?>
            								<?php  foreach ($withdraws as $node){	?>
            									<tr>
            										<td>
            										<span><?=htmlspecialchars($node->no)?></span>
            										</td>
            										<td><?=htmlspecialchars($node->amount)?></td>
            										<td><?=date('Y-m-d H:i:s',$node->create_time)?></td>
            										<td><?=htmlspecialchars($node->withdraw_transaction)?></td>
            										<td><span style="cursor:text" class="<?=element($node->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Withdraw::getTransferState($node->transfer_status)?></span></td>
            										<td><span style="cursor:text" class="<?=element($node->withdraw_status, $this->pay_status_css, '')?>"><?=IOSS_Withdraw::getWithdrawState($node->withdraw_status)?></span></td>
            									</tr>
            								<?php }?>
            								<?php else:?>
            									<tr>
            										<td colspan="6" align="center" style="color:red;">该用户红利记录为空</td>
            									</tr>
            								<?php endif;?>
            								</tbody>
        							</table>
        						</div>
							</div>
						</div>
						<!-- 该用户曾经提款记录结束 -->
						
						<!-- 提款订单操作记录开始 -->
						<div class="portlet">
							<div class="portlet-title" id="log_type_tit">
								<div class="caption">
									<i class="fa fa-history"></i>操作记录
								</div>
							</div>
							<script type="text/javascript">
							$(document).ready(function(){
								$("[name=log_type]").change(function(){
									$("[data-log-type]").hide();
									if($(this).val() == 'all'){
										$("[data-log-type]").show();
									}else{
										$("[data-log-type="+$(this).val()+"]").show();
									}
									$(document).scrollTop($("#log_type_tit")[0].offsetTop);
								});
							});
							</script>
							<div class="portlet-body" id="log_type_body">
								<!-- 时间轴 -->
								<div class="timeline">
								<?php $typePics = $this->config->item('order_log_type_css');?>
								<?php foreach ($withdrawLogList as $v){?>
									<div class="timeline-item">
										<div class="timeline-badge timeline_pic">
											<img class="timeline-badge-userpic" src="<?=image_url('/static/assets/admin/img/write.png')?>">
										</div>
										<div class="timeline-body timeline_mg">
											<div class="timeline-body-arrow">
											</div>
											<div class="timeline-body-head">
												<div class="timeline-body-head-caption">
													<a href="javascript:;" class="timeline-body-title font-blue-madison"><?=htmlspecialchars($v->admin_name.'('.$v->admin_account.')')?></a>
													<span class="timeline-body-time font-grey-cascade"><?=date('Y-m-d H:i:s', $v->create_time)?></span>
												</div>
											</div>
											<div class="timeline-body-content" style="word-break:break-all;">
												<span class="font-grey-cascade">
													<span style="cursor:text" class="<?=element($v->withdraw_status, $this->pay_status_css, '')?>"><?=IOSS_Withdraw::getWithdrawState($v->withdraw_status)?></span>
													<span style="cursor:text" class="<?=element($v->transfer_status, $this->transfer_status_css, '')?>"><?=IOSS_Withdraw::getTransferState($v->transfer_status)?></span>
													<span><?=htmlspecialchars($v->note)?></span>
												</span>
											</div>
										</div>
									</div>
								<?php }?>
								</div>
							</div>
						</div>
						<!-- 提款订单操作记录结束 -->
					</div>
				</div>
			</div>
		</div>
		<!-- END SAMPLE FORM PORTLET-->
	</div>
</div>
<!-- END PAGE CONTENT-->
